package com.after.saas.mq.constants;

import lombok.experimental.UtilityClass;
import org.apache.commons.lang3.StringUtils;

/**
 * @Classname Topics
 * @Description TODO
 * @auth after
 * @since 2021/8/10 17:57
 */
@UtilityClass
public class Topics implements ITopics {

    public String formatTopic(String topic, String tag) {
        if (StringUtils.isNoneBlank(tag)) {
            return String.format("%s:%s", topic, tag);
        }
        return topic;
    }
}
